Exceptions and Eventflow
نویسنده
چکیده
Exceptions historically derive from a single-threaded, imperative model of computation. Rather than including tests for the success of subsidiary operations at every procedure level using if-then-else's, it was deemed simpler to describe problems only where they arise and where they are dealt with. The catch-throw style was transferred to C++ (and then Java), and also grafted onto the I/O structures of declarative languages such as Prolog and Haskell. However, the evolution from object-oriented to eventoriented programming and the blending of this with a declarative base has led to a rather different view of computation, one which raises new questions about the relationships among events, exceptions and interrupts. This paper looks at some of these. 1 I n t r o d u c t i o n Exception-handling originated as an extension of the idea that programmers should not have to know everything about the machine they were writing programs for, to the extent of having to write code to deal with every possible contingency all the time. For instance, a division operation with 0 as its denominator can lead to a floating point overflow; one option might be that a programmer would always have to verify the denominator being non-zero before any division. However, this is not an ideal solution. One problem is that the way such an error should be dealt with is generally very similar across most occurrences, so that a lot of code would be duplicated over and over again. Even if the code were encapsulated in a procedure, the sheer number of calls would get in the way, the nature of the algorithm being programmed would be obscured, and the code would be much harder to read. The question of levels of abstraction comes into play as well; for example, if an error occurs whenion comes into play as well; for example, if an error occurs when reading a block from a disk, an ordinary applications programmer should not need to know how many retries should be attempted before giving up. Finally, the program causing the error is often running within a particular environment, and it is seldom desirable that the environment fail with the faulty program. So, a protective envelope ought to be added to protect the system from applications within it. The questions are where it should be, what it should look like, and who should see it when. High-level (as opposed to low-level) languages were designed to contain exceptions for two reasons. On the one hand, applications programmers wanted to be able to control certain kinds of errors for themselves, or to decide what should happen when particular special conditions arose. On the other hand, as systems began to be written in higher-level languages, the people developing those systems wanted mechanisms within those languages for describing what should be done when. The current commercial state-of-the-art represented by object-oriented languages like C++ and Java uses a catch-throw semantics in which methods containing method calls define a dynamic hierarchy; if an exception is thrown at a given level, it is passed up the hierarchy until it is caught by an
منابع مشابه
Visualizing Patterns of Drug Prescriptions with EventFlow: A Pilot Study of Asthma Medications in the Military Health System
The Food and Drug Administration and Department of Defense were interested in detecting sub-optimal use of long-acting beta-agonists (LABAs) in asthmatics within the Military Health System (MHS). Visualizing the patterns of asthma medication use surrounding a LABA prescription is a quick way to detect possible sub-optimal use for further evaluation. The US Army, Office of the Surgeon General, P...
متن کاملLearning analytics with EventFlow and CoCo: Exploring course enrollment pathways to inform curriculum planning
The emerging interdisciplinary field of learning analytics, however, has thus far given little attention to analytic exploration of ‘the environments in which learning occurs’, or their influences on learning outcomes or student success. I consider curriculum design and course offerings to be critical elements of the learning environment, a position supported by Ochoa and colleagues [1], who al...
متن کاملمعیارهای بهینهسازی مقررات محدودیتها و استثنائات در نظام حقوق مالکیت ادبی و هنری
The limitations and exceptions on the copyright and related rights is one of the most challenging and interesting issues of intellectual property rights and legislated with the aim of understanding of the public interest in the legal system. These limitations and exceptions has different categories such as library use, educational use, and so on, but as their implementation, there is the nee...
متن کاملارائه رویکردی نوین یادگیری ماشین برای شناسایی و تجزیه و تحلیل دانش پدیدههای استثنایی
Learning logic of exceptions is a substantial challenge in data mining and knowledge discovery. Exceptional phenomena detection takes place among huge records in a database which contains a large number of normal records and a few of exceptional ones. This is important to promote the confidence to a limited number of exceptional records for effective learning. In this study, a new approach base...
متن کاملA consideration of the theory of exceptions in makki and madani chapters
By exceptional verses is meant makki verse in madani chapter and madani verse in makki chapter. There cannot be found any reference to this theory in sources in first and second century of Hijri. In the third, however, it was found on a small scale; in the next two centuries, the number of the cases increased gradually and in the sixth and seventh it came to its ultimate point. Therefore, there...
متن کامل